<?php

class ProviderIdSolve extends CActiveRecordBehavior {
	
	public function beforeValidate($event) {
		
		if(Yii::app()->adminUser->role == AdminUser::ROLE_PROVIDER) {
			$this->owner->provider_id = Yii::app()->adminUser->id;
		}
		
	}

}

?>
